package com.ruoyi.project.his.service.impl;


import com.ruoyi.project.his.domain.HisDept;
import com.ruoyi.project.his.mapper.HisDeptMapper;
import com.ruoyi.project.his.service.IHisDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HisDeptServiceImpl implements IHisDeptService {
    /**
     * 编程规范：
     * 在团队开发中，如果希望调用自己模块的表，直接直接注入自己的mapper
     *
     * 如果希望调用其他人开发的模块，只能注入其他人写的service。
     */
    @Autowired
    private HisDeptMapper hisDeptMapper;
    @Override
    public List<HisDept> selectDeptList(HisDept hisDept) {
        return hisDeptMapper.selectDeptList(hisDept);
    }

    @Override
    public int insertDept(HisDept hisDept) {
        return hisDeptMapper.insertDept(hisDept);
    }

    @Override
    public int deleteDeptByIds(Long[] ids) {
        return hisDeptMapper.deleteByIds(ids);
    }

    @Override
    public HisDept selectDeptById(Long id) {
        return hisDeptMapper.selectDeptById(id);
    }

    @Override
    public int updateDept(HisDept hisDept) {
        return hisDeptMapper.updateDept(hisDept);
    }
}
